public class HomeWork12_01{
    public static void main(String[] args){
        int[] A = new int[]{1, 2, 3, 4, 5, 6, 7, 8};
        int[] B = new int[5];
        ArrCopy.IntArrCopy(A, B, 0, 5);
        
        for(int item : B){
            System.out.println(item);
        }
    }
}

class ArrCopy{
    public static void IntArrCopy(int[] A, int[] B, int start, int count){
        for(int i = 0; i < count; i++){
            B[i] = A[i + start];
        }
    }
}